package com.project.mapper.Provider;

import java.util.Map;

public class EmProvider {
    public String findByItem(Map map){
        String sql = "select * from t_employee where 1=1";
        if (map.get("name")!=null && map.get("name").toString().length()!=0){
            sql += "and e_name like '%"+map.get("name")+"%' ";
        }
        if (map.get("startBirth")!=null){
            sql += "and e_birthday >= '"+map.get("startBirth")+"' ";
        }
        if (map.get("endBirth")!=null){
            sql += "and e_name <= '"+map.get("endBirth")+"' ";
        }
        return sql;
    }
}
